<template>
  <page-header :title="tabs.name" :menuId="tabs.id" />
  <template v-for="(item, index) in tabs.functions" :key="index">
    <environmental-indicators v-if="item.name === PageMap.ENVIRONMENTAL_INDICATORS && item.status === 0" :title="item.name" :menuId="item.id" />
    <industry-comparison v-if="item.enName === PageMap.PERFORMANCE_COMPARISON && item.status === 0" :menuId="item.id" :count="item.count" :title="item.name" />
  </template>
</template>

<script lang="ts" setup>
import PageHeader from '../../components/page-header.vue';
import IndustryComparison from './modules/industry-comparison/index.vue';
import EnvironmentalIndicators from './modules/environmental-indicators/index.vue';

interface Props {
  tabs: Record<string, any>;
}

const { tabs } = defineProps<Props>();

enum PageMap {
  /** 同业对比 */
  PERFORMANCE_COMPARISON = 'performance_comparison',
  /** 环境绩效 */
  ENVIRONMENTAL_INDICATORS = '环境绩效'
}
</script>
